//
//  SEGVisitorAccessCodeViewModel.h
//  SEGViewModel
//
//  Created by 乔杨 on 2020/6/4.
//

#import <Foundation/Foundation.h>
#import "SEGVisitorAccessCodeModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, SEGVisitorQRCodeDisplayStyle) {
    SEGVisitorQRCodeDisplayNotExistStyle, // 没有海康门
    SEGVisitorQRCodeDisplayLoadingStyle,  // 正在加载二维码
    SEGVisitorQRCodeDisplayNoAuthStyle,   // 没有权限
    SEGVisitorQRCodeDisplayLoadFailStyle, // 加载失败
    SEGVisitorQRCodeDisplayNormalStyle,   // 显示二维码
    SEGVisitorQRCodeDisplayWebImageStyle  // 显示网络图片
};

@interface SEGVisitorAccessCodeViewModel : NSObject

/// 分享链接
@property (nonatomic, copy) NSString *shareUrl;
/// 选择的门禁信息
@property (nonatomic, strong)SEGVisitorAccessCodeModel *codeModel;
/// 门信息高度
@property (nonatomic, assign) CGFloat doorInfoCellHeight;

#pragma mark - park

/// 刷新页面回调 （isLoading = YES：展示加载动画，isLoading = NO：取消加载动画，刷新表格）
@property (nonatomic, copy) void(^refreshBlock)(BOOL isLoading);
@property (nonatomic, strong) SEGVisitorAccessDoorModel *haikangDoorModel; ///< 海康门禁数据模型
@property (nonatomic, assign) SEGVisitorQRCodeDisplayStyle qrcodeDisplayStyle;
@property (nonatomic, copy) NSString *qrcodeString;
@property (nonatomic, copy) NSString *qrcodeWebString;
 
/// 请求海康二维码
- (void)seg_requestHaiKangQRCode;
#pragma mark - -------

/// 获取分享的信息
- (NSDictionary *)seg_getShareInfo;

@end

NS_ASSUME_NONNULL_END
